Feat: Add build egress hatch and bump allow-list - #37
Merged
tykeal merged 1 commit intoJul 29, 2026
Conversation
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 10:29
View session
There was a problem hiding this comment.
Pull request overview
This PR updates the reusable Python GitHub Actions workflows to improve reliability under harden-runner “block” mode by adding a build-only egress escape hatch and updating the harden-runner allow-list pin.
Changes:
- Add a new
build_permit_egress_trafficboolean input (defaultfalse) to let thepython-buildjob run harden-runner inauditmode independently of other jobs. - Update
harden_runner_allowlistdefault pin from v0.1.1 to v0.10.0 across all four reusable workflows. - Adjust
python-buildjob harden-runner step conditions to honorbuild_permit_egress_traffic.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/build-test.yaml | Adds build_permit_egress_traffic, bumps allow-list pin, and gates python-build harden-runner steps accordingly. |
| .github/workflows/build-test-multiarch.yaml | Same changes applied to the multi-arch build workflow’s matrixed python-build job. |
| .github/workflows/build-test-release.yaml | Same changes applied to the release workflow’s python-build job and allow-list pin. |
| .github/workflows/build-test-release-multiarch.yaml | Same changes applied to the release multi-arch workflow’s matrixed python-build job and allow-list pin. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ModeSevenIndustrialSolutions
force-pushed
the
feat/build-egress-hatch-allowlist-v0.10.0
branch
from
July 28, 2026 12:07
a6a6d97 to
842ae41
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 12:07
View session
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 13:26
View session
ModeSevenIndustrialSolutions
force-pushed
the
feat/build-egress-hatch-allowlist-v0.10.0
branch
from
July 28, 2026 13:33
842ae41 to
780777d
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 13:34
View session
ModeSevenIndustrialSolutions
force-pushed
the
feat/build-egress-hatch-allowlist-v0.10.0
branch
from
July 28, 2026 15:08
780777d to
030d6ca
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 15:09
View session
ModeSevenIndustrialSolutions
force-pushed
the
feat/build-egress-hatch-allowlist-v0.10.0
branch
from
July 28, 2026 17:53
030d6ca to
23413ab
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 17:54
View session
Add a 'build_permit_egress_traffic' input (boolean, default false) that runs harden-runner in audit mode for the python-build job only, leaving every other job governed by 'harden_runner_egress'. Build lanes fetch dependencies from CDNs that are impractical to enumerate in the egress allow-list; this narrows the exemption to the job that needs it, rather than dropping every job to audit. Each job uses a single harden-runner step with the egress policy computed inline, not two steps selected by a step-level 'if:'. harden-runner declares a 'pre' entry point and no 'pre-if', so its pre-phase -- where the network policy engages -- runs regardless of the condition. Two steps would both engage, block would win, and audit mode (and this build hatch) would be silently unreachable. The allow-list now loads unconditionally, a small fetch audit ignores. This mirrors the fix applied in java-workflows. Also bump the 'harden_runner_allowlist' default to .github v0.12.1. The previous pin predates the Gerrit SSH (tcp/29418), Temurin and Gradle endpoint additions, so block-mode jobs could not vote on a Gerrit change or provision a JVM toolchain. v0.12.0 added 66 entries, taking the list from 97 to 163: Linux Foundation platform hosts from the inventory (documentation sites, wikis and Jira tenants, the Nexus and Nexus3 artifact repositories including their Docker registry ports 10001-10004, the JFrog Artifactory instances, ReadTheDocs, and Gerrit for Anuket/OPNFV on both 443 and 29418). v0.12.1 then adds the Yarn egress endpoints (registry.yarnpkg.com and dl.yarnpkg.com). The bump covers every live pin in the repository, not just the four reusable defaults. The repository's own CI (tag-push.yaml twice, release-drafter.yaml, clear-action-cache.yaml) and the four build-test-release example callers each carried the same pin. Twelve live pins now reference v0.12.1. The pin is the commit the annotated tag resolves to, not the tag object. The occurrence in docs/BRIEF.md keeps its original SHA on purpose, as a record of the pins chosen during the design discussion. Co-authored-by: Claude <claude@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
ModeSevenIndustrialSolutions
force-pushed
the
feat/build-egress-hatch-allowlist-v0.10.0
branch
from
July 28, 2026 18:51
23413ab to
b800302
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
July 28, 2026 18:51
View session
tykeal
approved these changes
Jul 29, 2026
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feat: Add build egress hatch and bump allow-list
Two related changes ensuring builds work reliably under harden-runner block mode.
1.
build_permit_egress_traffic(implemented as a single harden-runner step)New optional input (boolean, default
false). When true, thepython-buildjob runs harden-runner in audit mode while every other job stays governed byharden_runner_egress. Build lanes fetch dependencies from CDNs that are impractical to enumerate in the egress allow-list; this narrows the exemption to the one job that needs it, instead of dropping every job to audit viaharden_runner_egress: 'audit'.Each job now uses one harden-runner step with the policy computed inline — not two steps (block / audit) selected by a step-level
if:. harden-runner declares apreentry point and nopre-if, so its pre-phase (where the network policy engages) runs regardless of the condition. With two steps both pre-phases engage, block runs first and wins, and theif:only gates the inert main phase — soaudit/build_permit_egress_trafficwould be silently unreachable. This matches the fix injava-workflows(Fix: Apply one harden-runner step per job).The allow-list loads unconditionally (a small fetch audit mode ignores). Default
falsepreserves current behaviour, and the fail-secure default is retained — anything other than an explicit audit request resolves toblock.2. Allow-list bump →
.githubv0.12.1The pin moves to
@60d8d71016f31c26775e5ec9380eba4264aa6f9e # v0.12.1.This repository was the furthest behind of the four workflow repos.
v0.12.0added 66 Linux Foundation platform hosts (documentation sites, wikis and Jira tenants; the Nexus/Nexus3 artifact repositories including Docker registry ports 10001–10004; JFrog Artifactory; ReadTheDocs; and Gerrit for Anuket/OPNFV on 443 + 29418), taking the list from 97 to 163.v0.12.1then adds the Yarn egress endpoints (registry.yarnpkg.com,dl.yarnpkg.com) — Yarn's documented corporate-firewall set, needed so block-modeyarn installsucceeds for Yarn-based consumers.The bump covers every live pin in the repository
Twelve live pins, not just the four reusable defaults:
harden_runner_allowlistdefaults)tag-push.yamlrelease-drafter.yaml/clear-action-cache.yamlexamples/build-test-release{,-multiarch}/{github,gerrit}.yaml(consumers copy these)Verified mechanically (per-file expected occurrence counts).
docs/BRIEF.mdkeeps its original SHA on purpose — a historical record of the pins chosen during the design discussion.Verification of the pin
git rev-list -n 1 v0.12.1→60d8d71…), not the tag object.allow_list.txtat the v0.12.1 tag.Scope & validation
python-buildjob additionally folds inbuild_permit_egress_traffic.Harden runner (audit)toggle remains anywhere (the block-only steps in the internal/example workflows are single-step and correct); all 12 pins now read v0.12.1; computedegress-policycount = 6 / 6 / 9 / 10.actionlintpasses on all four reusable workflows.Note
The branch name still reads
…-v0.10.0. Renaming it would close and recreate this PR, so it is left as-is; the pin, commit message and this description all reference v0.12.1.